package atomicPlayground;

import static processing.core.PConstants.*;
import processing.core.*;
import elec.ElectroFlake;
import static mathUtils.VecMath.*;

public class Electron extends ElectroFlake {

	public Electron(PApplet p) {
		super(p);
	}
	public Electron(PApplet p, float px, float py, float vx, float vy) {
		super(p, 1f, -1f, 0.5f, px, py, vx, vy);
	}
	public Electron(PApplet p, float px, float py) {
		super(p, 1f, -1f, 0.5f, px, py, 0, 0);
	}
	
	public void wiggle(float d) {
		float r = parent.random(0,d);
		float ang = parent.random(0, TWO_PI);
		vecAdd(position(), vecByMagAngle(r, ang), position());		
	}
	
	public void draw() {
		parent.strokeWeight(0);
		parent.stroke(250, 250, 0);
		parent.fill(250, 250, 0);
		parent.ellipse(s[0][0], s[0][1], 0.5f, 0.5f);
	}
}
